//
//  WSAppDelegateRequest.m
//  CharonTVProject
//
//  Created by karong on 2023/7/31.
//

#import "WSAppDelegateRequest.h"

@implementation WSAppDelegateRequest

+ (void)wakeUpSaveWithSuccess:(charonTV_EmptyBlock)success failed:(Failure)failed {
    NSString * url = API_CHARONTV_WAKEUP_SAVE;
    NSString * language = [[NSLocale preferredLanguages] firstObject];
    NSDictionary * parameters = @{@"uuid":[WSUserCenter uuid],
                                  @"device_lang":WSEmptyStr(language)
    };
    [self postWithURLString:url parameters:parameters success:^(NSDictionary * _Nonnull responseDict) {
    } failure:failed];
}

+ (void)loadcharonTV_Config {
    NSString * url = API_CHARONTV_START_CONFIG;
    NSDictionary * parameters = @{};
    [self postWithURLString:url parameters:parameters success:^(NSDictionary * _Nonnull responseDict) {
        WSStartConfig * startConfig = [WSStartConfig mj_objectWithKeyValues:responseDict];
        appConfig.startConfig = startConfig;
    } failure:^(NSURLResponse * _Nonnull response, NSError * _Nonnull error, id  _Nonnull responseObject) {
        
    }];
}
@end
